// 轮播图数据接口
import { onMounted, ref } from 'vue';
import { getBannerList } from '@/apis/home'

const useBanner = () => {
    // 轮播图数据
    const carouselDataList = ref([])
    const getCarouselList = async () => {
        const res = await getBannerList(2)
        carouselDataList.value = res.data.result
    }
    onMounted(() => getCarouselList())

    return {
        carouselDataList
    }
}

export default useBanner